package com.zareal.ymcc.feign;

import com.zareal.ymcc.feign.fallback.CourseServiceFeignClientFallbackFactory;
import com.zareal.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@FeignClient(value = "service-course",fallbackFactory = CourseServiceFeignClientFallbackFactory.class)
public interface CourseServiceFeignClient {
    /**
     * 支付页面获取信息，根据课程id
     */
    @RequestMapping(value = "/course/info/{courseIds}",method = RequestMethod.GET)
    JSONResult getInfo(@PathVariable("courseIds")String courseIds);

    /**
     * 获取对象
     */
    @RequestMapping(value = "/course/{id}", method = RequestMethod.GET)
    JSONResult get(@PathVariable("id") Long id);

}
